<div data-hook="admin_store_credit_form_fields">
  <%= f.field_container :amount, class: ['form-group'] do %>
    <%= f.label :amount, raw(Spree.t(:amount) + content_tag(:span, " *", class: "required")) %>
    <%= f.text_field :amount, class: 'form-control' %>
    <%= f.error_message_on :amount %>
  <% end %>
  <%= f.field_container :category, class: ['form-group'] do %>
    <%= f.label :category, raw(Spree.t(:category) + content_tag(:span, " *", class: "required")) %>
    <%= f.select :category_id, options_from_collection_for_select(@credit_categories, :id, :name, f.object.category.try(:id)),
        { include_blank: true }, { class: 'select2 fullwidth', placeholder: Spree.t(:select_a_store_credit_reason) } %>
    <%= f.error_message_on :category %>
  <% end %>
  <%= f.field_container :memo, class: ['form-group'] do %>
    <%= f.label :memo, Spree.t(:memo) %>
    <%= f.text_area :memo, class: 'form-control' %>
    <%= f.error_message_on :memo %>
  <% end %>
</div>
